package cn.edu.dzkd.software.service;

import cn.edu.dzkd.software.mapper.DangerlevelMapper;
import cn.edu.dzkd.software.mapper.DepartmentMapper;
import cn.edu.dzkd.software.pojo.Dangerlevel;
import cn.edu.dzkd.software.pojo.Department;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: PDJ
 * Date: 2022/07/07 22:55
 * Description:
 * Version: V1.0
 */
@Service
public class DangerlevelService {
    @Resource
    private DangerlevelMapper dangerlevelMapper;

    public Map<String, Object> selectAlldangerlevel() {
        Map<String, Object> map = new HashMap<>();
        List<Dangerlevel> dangerlevel = dangerlevelMapper.selectAlldangerlevel();
        map.put("code", 0);           // layui默认返回0的状态为成功
        map.put("msg", "");           // layui不解析msg中的信息
        map.put("data", dangerlevel);       // 当前页的数据内容
        return map;
    }
}
